package cn.initcap.designpattern.pattern.structural.decorator;

/**
 * 装饰器模式
 *
 * @author initcap
 * @date 2018/8/28 AM9:13
 */
public class Test {

    public static void main(String[] args) {

        AbstractBattercake abstractBattercake =
                new SausageDecorator(new SausageDecorator(new EggDecorator(new EggDecorator(new Battercake()))));

        System.out.println(abstractBattercake.getDesc() + " 销售价格:" + abstractBattercake.cost());

    }
}
